package servlets;

import db2.SignDao;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;
//完成就诊
public class uppatient extends HttpServlet {//完成就诊
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("uppatient in");
        if(req.getParameter("Account")!=null) {
            System.out.println("get Account Yes");
            SignDao signDao=new SignDao();
            if(!signDao.UpSign(req.getParameter("Account"),Integer.parseInt(req.getParameter("indid")))){
                System.out.println("update Sign false");
            }
            resp.sendRedirect("Callpatient.jsp");
        }
        else
            System.out.println("get idnumber Error");
    }
}
